<?php

class testeditMasterSchedule extends WebTestCase {

    function testeditMasterScheduleModule() {
        
        $this->get('http://localhost/index.php');
        $this->assertResponse(200);
        $this->setField('user', 'admin');
        $this->setField('pass', 'devproject');
        $this->click('Login');
        
        $this->get('http://localhost/editMasterSchedule.php?group=One&day=Mon&shift=9-12');
        $this->assertResponse(200);
        $this->assertText("Monday, 9am to 12pm");
        $this->click("Add Slot");
        $this->assertResponse(200);
        $this->assertText("3 slots for this shift:");
        $this->click("Remove Vacant Slot");
        $this->assertResponse(200);
        $this->assertText("2 slots for this shift:");
        $this->assertText("linda jones");
        $this->click("Remove Person / Create Vacancy");

        $this->click("Assign Volunteer");
        $this->assertResponse(200);
        $this->assertText("Filling a vacancy");
        $this->setField("scheduled_vol", "jones, linda");

        $this->click("Add Volunteer");
        $this->assertResponse(200);
        $this->assertText("linda jones");

        
        $this->get('http://localhost/logout.php');
        $this->assertResponse(200);  
        
        echo("testeditMasterSchedule complete");
    }

}

?>
